package cn.hy.preparelesson.common.entity;

import java.util.Date;

public class SysRoleRegisterRequirement {
    /**
     * 主键
     */
    private String id;

    /**
     * 角色id
     */
    private String roleId;

    /**
     * 角色所在学校id
     */
    private String schoolId;

    /**
     * 角色注册要求key
     */
    private String requireKey;

    /**
     * 备选值(json格式的字符串）
     */
    private String availableValue;

    /**
     * 是否必填（0:否，1:是）
     */
    private Byte required;

    /**
     * 提示信息
     */
    private String tip;

    /**
     * 要求类型（0:输入框，1:文件，2:下拉选择）
     */
    private Byte type;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 自动审核对应的数据库字段（表明.字段名的格式）
     */
    private String databaseMapping;

    /**
     * 创建人
     */
    private String createBy;

    /**
     * 创建时间
     */
    private Date createAt;

    private static final long serialVersionUID = 1L;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(String schoolId) {
        this.schoolId = schoolId;
    }

    public String getRequireKey() {
        return requireKey;
    }

    public void setRequireKey(String requireKey) {
        this.requireKey = requireKey;
    }

    public String getAvailableValue() {
        return availableValue;
    }

    public void setAvailableValue(String availableValue) {
        this.availableValue = availableValue;
    }

    public Byte getRequired() {
        return required;
    }

    public void setRequired(Byte required) {
        this.required = required;
    }

    public String getTip() {
        return tip;
    }

    public void setTip(String tip) {
        this.tip = tip;
    }

    public Byte getType() {
        return type;
    }

    public void setType(Byte type) {
        this.type = type;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getDatabaseMapping() {
        return databaseMapping;
    }

    public void setDatabaseMapping(String databaseMapping) {
        this.databaseMapping = databaseMapping;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Date createAt) {
        this.createAt = createAt;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysRoleRegisterRequirement other = (SysRoleRegisterRequirement) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getRoleId() == null ? other.getRoleId() == null : this.getRoleId().equals(other.getRoleId()))
                && (this.getSchoolId() == null ? other.getSchoolId() == null : this.getSchoolId().equals(other.getSchoolId()))
                && (this.getRequireKey() == null ? other.getRequireKey() == null : this.getRequireKey().equals(other.getRequireKey()))
                && (this.getAvailableValue() == null ? other.getAvailableValue() == null : this.getAvailableValue().equals(other.getAvailableValue()))
                && (this.getRequired() == null ? other.getRequired() == null : this.getRequired().equals(other.getRequired()))
                && (this.getTip() == null ? other.getTip() == null : this.getTip().equals(other.getTip()))
                && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
                && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
                && (this.getDatabaseMapping() == null ? other.getDatabaseMapping() == null : this.getDatabaseMapping().equals(other.getDatabaseMapping()))
                && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
                && (this.getCreateAt() == null ? other.getCreateAt() == null : this.getCreateAt().equals(other.getCreateAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getRoleId() == null) ? 0 : getRoleId().hashCode());
        result = prime * result + ((getSchoolId() == null) ? 0 : getSchoolId().hashCode());
        result = prime * result + ((getRequireKey() == null) ? 0 : getRequireKey().hashCode());
        result = prime * result + ((getAvailableValue() == null) ? 0 : getAvailableValue().hashCode());
        result = prime * result + ((getRequired() == null) ? 0 : getRequired().hashCode());
        result = prime * result + ((getTip() == null) ? 0 : getTip().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
        result = prime * result + ((getDatabaseMapping() == null) ? 0 : getDatabaseMapping().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateAt() == null) ? 0 : getCreateAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", roleId=").append(roleId);
        sb.append(", schoolId=").append(schoolId);
        sb.append(", requireKey=").append(requireKey);
        sb.append(", availableValue=").append(availableValue);
        sb.append(", required=").append(required);
        sb.append(", tip=").append(tip);
        sb.append(", type=").append(type);
        sb.append(", sort=").append(sort);
        sb.append(", databaseMapping=").append(databaseMapping);
        sb.append(", createBy=").append(createBy);
        sb.append(", createAt=").append(createAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
